<!DOCTYPE html>
<html lang="en">
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
	<meta charset="UTF-8">
	<title>身份认证</title>
	<meta name="description" content="">
	<meta name="keywords" content="">
	<meta name="viewport" content="initial-scale=1, width=device-width, maximum-scale=1, user-scalable=no">
	<meta name="format-detection" content="telephone=no,email=no,adress=no" />
	<meta name="apple-mobile-web-app-capable" content="yes" />  
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<link rel="stylesheet" href="{THEME_PATH}styles/swiper.min.css">
	<link rel="stylesheet" href="{THEME_PATH}styles/reset.css">
	<link rel="stylesheet" href="{THEME_PATH}styles/common.css">
	<link rel="stylesheet" href="{THEME_PATH}styles/style.css">
	<script src="{THEME_PATH}js/jquery-1.8.3.min.js"></script>
	<script src="{THEME_PATH}js/swiper.min.js"></script>
	<script src="/statics/js/layer/layer.js"></script>
	<style>
		.common-item input{
			border:0;
			outline:none;
		}
	</style>	
</head>
<body>
	<!-- S header -->
	<header>
		<a href="/index.php?m=user/&c=home&a=upload_identity" class="headerL iconfont">&#xe69f;</a>
		<h1>身份认证</h1>
	</header>
	<!-- E header -->
	
	<ul>
		<li class="flex flex-pack-justify common-item">
			<label class="left">真实姓名</label>
			<input type="text" class="right alignR" placeholder="请输入真实姓名" name="real_name" value="<?php  echo $user_info['real_name'] ? $user_info['real_name'] : ''; ?>">
		</li>
		<!-- <li class="flex flex-pack-justify common-item">
			<label class="left">证件类型</label>
			<span class="right">身份证</span>
		</li> -->
		<li class="flex flex-pack-justify common-item">
			<label class="left">证件号码</label>
			<input type="text" class="right alignR" placeholder="请输入身份证号码" name="identidy_number" value="<?php  echo $user_info['identidy_number'] ? $user_info['identidy_number'] :''; ?>">
		</li>
	</ul>
	<input type="hidden" name="username" value="<?php echo $username;?>">
	<a href="javascript:;" class="btn">提交</a>
</body>
<script>
$('.btn').click(function (){
	var real_name = $("input[name='real_name']").val();
	var identidy_number = $("input[name='identidy_number']").val();
	var username = $("input[name='username']").val();
	if(!real_name || !identidy_number){
		layer.msg('请输入要提交的信息');
		return;
	}
	$.ajax({
				url:"/index.php/?m=user&c=home&a=sure_info",
				type:'post',
				data:{identidy_number:identidy_number,real_name:real_name,username:username},
				dataType:'json',
				success:function(data){
			
					if(data.status ==0){
						layer.msg(data.info);
					}else{
						layer.msg(data.info);
                        setTimeout(function(){
        					location.href = "/index.php?m=user&c=home&a=renzheng_shenhe";
    					},1000);
						
						return;
					}
				}
			})	
})
</script>
</html>